package com.lhkj.ct.meta.modules.scheduling.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.lhkj.ct.base.model.dto.PageQuery;
import com.lhkj.ct.base.mybatis.core.metadata.SqlOrder;
import com.lhkj.ct.base.mybatis.extension.service.impl.IServiceImpl;
import com.lhkj.ct.meta.modules.scheduling.mapper.OrderDetailsMapper;
import com.lhkj.ct.meta.modules.scheduling.model.entity.TblOrderDetails;
import com.lhkj.ct.meta.modules.scheduling.model.vo.DiagOrdersItemVo;
import com.lhkj.ct.meta.modules.scheduling.service.OrderDetailsService;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 医嘱信息 服务实现类
 * </p>
 *
 * @author jobob
 * @since 2024-01-29
 */
@Service
public class OrderDetailsServiceImpl extends IServiceImpl<OrderDetailsMapper, TblOrderDetails> implements OrderDetailsService {

    @Override
    public IPage<DiagOrdersItemVo> selectOrdersPage(TblOrderDetails appoint, PageQuery pageQuery) {
        return getBaseMapper().selectOrdersPage(generatePage(pageQuery, SqlOrder.desc(TblOrderDetails::getOrderDate)), appoint, pageQuery);
    }
}
